#pragma once
#include "mytypes.h"
#include "interfaces.h"
#include "PolyLine.h"

namespace poly
{
	class PolyLineView : public IGraphic
	{
	public:
		PolyLineView( D3DDevice device = 0 );
		~PolyLineView();
		void initialize( D3DDevice device );
		void destroy();

		PolyLine polyLine() const;
		float4 color() const;

		void setup( PolyLine const & P, float4 const & c );

		void render( float44 const & );

	private:
		void setPolyLine( PolyLine const & P );
		void setColor( float4 const & c );

		PolyLine		m_polyLine;
		D3DDevice		m_device;
		VertexBuffer	m_vertexBuffer;
		float4			m_color;

		static const DWORD FVF;;
		static const uint32 vertexSize;
	};
}